<script src="../include.js"></script>
<style>
    * { border: 1px solid black; }
    .inner { width: 100px; height: 100px; }
</style>
<div class="outer"><div class="inner">
<script>
    asyncTest(done => {
        let eventCount = 0;

        function clickHandler() {
            eventCount++;
            if (eventCount == 2) {
                println('PASS (did not hang)');
                done();
            }
        }

        document.querySelector('.outer').addEventListener('click', clickHandler);
        document.querySelector('.inner').addEventListener('click', clickHandler);

        internals.click(50, 50);
    });
</script>
